<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <title>秒速侠</title>
    <!-- angular -->
    <script src="https://cdn.bootcdn.net/ajax/libs/angular.js/1.2.9/angular.min.js"></script>
    <meta name="description" content="秒速侠">
    <link href="../css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
    <link href="../css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
    <link href="../css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
    <link href="../css/login.min.css" th:href="@{/css/login.min.css}" rel="stylesheet"/>
    <link href="../ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.1.0}" rel="stylesheet"/>
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <link rel="shortcut icon" href="../static/favicon.ico" th:href="@{favicon.ico}"/>
    <style type="text/css">label.error { position:inherit;  }</style>

    <script>
        if(window.top!==window.self){window.top.location=window.location};
    </script>

    <script>
        //angular
        var app = angular.module('app',[])
        app.controller('controller',function($scope,$http){
            $scope.list=[]//展示
            //token
            $scope.token=window.localStorage.getItem("token")

            //查询用户账单
            $scope.getbill=function(){
                $http({
                    method: 'get', //提交方式
                    data: '',
                    url: "http://localhost:8082/trade/zhuangdan",
                    headers: {//这里设置
                        'token':$scope.token //请求头token
                    }
                }).success(res=>{
                    console.log(res);

                    alert(res)
                    $scope.list=res.data.data;
                })
            }
            //账单号
            $scope.zhangdan=function(billNumber){
                alert(billNumber);
            }
            //订单号
            $scope.zhangdan1=function(billBorrowNumber){
                alert(billBorrowNumber)
            }
            $scope.tz=function (id) {
                alert(id)
                location.href="repay.html"+id;
            }
        })
    </script>


</head>
<body class="hold-transition skin-red sidebar-mini" ng-app="app" ng-controller="controller" ng-init="getbill()" >
  <!-- .box-body -->
                    <div class="box-header with-border">
                        <h3 class="box-title">管理</h3>
                    </div>

                    <div class="box-body">

                        <!-- 数据表格 -->
                        <div class="table-box">

                            <!--工具栏-->
                            <div class="pull-left">
                            </div>
                            <div class="box-tools pull-right">
                                <div class="has-feedback">							       
                                </div>
                            </div>
                            <!--工具栏/-->

			                  <!--数据列表-->
			                  <table id="dataList" class="table table-bordered table-striped table-hover dataTable">
			                      <thead>
			                          <tr>

										                               <th class="sorting">ID 前缀HK_</th>			
                             <th class="sorting">订单id</th>			
                             <th class="sorting">当前是第几期</th>			
                             <th class="sorting">当期应还金额</th>			
                             <th class="sorting">开始时间</th>			
                             <th class="sorting">还款时间</th>			
                             <th class="sorting">用户姓名</th>			
                             <th class="sorting">用户手机号</th>			
                             <th class="sorting">用户ID</th>			
                             <th class="sorting">账单状态</th>
								     				
					                      <th class="text-center">操作</th>
			                          </tr>
			                      </thead>
			                      <tbody>
			                          <tr ng-repeat="entity in list">

				                                                       <td>{{entity.id}}</td>			
                             <td>{{entity.orderId}}</td>			
                             <td>{{entity.whichIs}}</td>			
                             <td>{{entity.whichMoney}}</td>			
                             <td>{{entity.createTime}}</td>			
                             <td>{{entity.endTime}}</td>			
                             <td>{{entity.userName}}</td>			
                             <td>{{entity.userMobile}}</td>			
                             <td>{{entity.userId}}</td>			
                             <td>{{entity.state}}</td>			
                             		
		                                 
		                                  <td class="text-center">                                           
		                                 	 <button ng-click="tz(entity.id)">付款</button>
		                                  </td>
			                          </tr>									 
			                      </tbody>
			                  </table>
			                  <!--数据列表/-->                        
                        </div>
                        <!-- 数据表格 /-->
                        <!-- 分页 -->
						<tm-pagination conf="paginationConf"></tm-pagination>
                     </div>
                    <!-- /.box-body -->
         
<!-- 编辑窗口 -->
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog" >
	<div class="modal-content">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
			<h3 id="myModalLabel">编辑</h3>
		</div>
		<div class="modal-body">	
			 <table class="table table-bordered table-striped"  width="800px">			
		      	  		      	<tr>
                             
<td>订单id</td>

                             <td><input  class="form-control" ng-model="entity.orderId" placeholder="订单id" ></td>

                        </tr>		
		      	<tr>
                             
<td>当前是第几期</td>

                             <td><input  class="form-control" ng-model="entity.whichIs" placeholder="当前是第几期" ></td>

                        </tr>		
		      	<tr>
                             
<td>当期应还金额</td>

                             <td><input  class="form-control" ng-model="entity.whichMoney" placeholder="当期应还金额" ></td>

                        </tr>		
		      	<tr>
                             
<td>开始时间</td>

                             <td><input  class="form-control" ng-model="entity.createTime" placeholder="开始时间" ></td>

                        </tr>		
		      	<tr>
                             
<td>还款时间</td>

                             <td><input  class="form-control" ng-model="entity.endTime" placeholder="还款时间" ></td>

                        </tr>		
		      	<tr>
                             
<td>用户姓名</td>

                             <td><input  class="form-control" ng-model="entity.userName" placeholder="用户姓名" ></td>

                        </tr>		
		      	<tr>
                             
<td>用户手机号</td>

                             <td><input  class="form-control" ng-model="entity.userMobile" placeholder="用户手机号" ></td>

                        </tr>		
		      	<tr>
                             
<td>用户ID</td>

                             <td><input  class="form-control" ng-model="entity.userId" placeholder="用户ID" ></td>

                        </tr>		
		      	<tr>
                             
<td>账单状态 0:待还款1:已还款2:逾期3:未到期</td>

                             <td><input  class="form-control" ng-model="entity.state" placeholder="账单状态 0:待还款1:已还款2:逾期3:未到期" ></td>

                        </tr>		
		      	<tr>
                             
<td>逻辑删除 0:未删除1:删除</td>

                             <td><input  class="form-control" ng-model="entity.isDelete" placeholder="逻辑删除 0:未删除1:删除" ></td>

                        </tr>		
		  		      	
			 </table>				
		</div>
		<div class="modal-footer">						
			<button class="btn btn-success" data-dismiss="modal" aria-hidden="true" ng-click="save()">保存</button>
			<button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
		</div>
	  </div>
	</div>
</div>
   
</body>
</html>
